/*
 * JplotxyzJFrame.java
 *
 * Created on July 5, 2007, 10:24 AM
 */

package jplotxyz;

import java.io.File;
import javax.imageio.ImageIO;

/**
 *
 * @author  shackle
 */
public class JplotxyzJFrame extends javax.swing.JFrame
{
    
    /** Creates new form JplotxyzJFrame */
    public JplotxyzJFrame()
    {
	initComponents();
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents()
    {
        exteriorXYZJPanel1 = new jplotxyz.ExteriorXYZJPanel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(exteriorXYZJPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(exteriorXYZJPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pack();
    }// </editor-fold>//GEN-END:initComponents
    
    public void setImage(java.awt.Image img)
    {
	this.exteriorXYZJPanel1.setImage(img);
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[])
    {
	final String private_args[] = args;
	java.awt.EventQueue.invokeLater(new Runnable()
	{
	    public void run()
	    {
		JplotxyzJFrame jf = new JplotxyzJFrame();
		jf.setVisible(true);
		try
		{
		    for(String arg : private_args)
		    {
			jf.setImage(ImageIO.read(new File(arg)));
			jf.repaint();
		    }
		}
		catch(Exception e)
		{
		    e.printStackTrace();
		}
	    }
	});
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private jplotxyz.ExteriorXYZJPanel exteriorXYZJPanel1;
    // End of variables declaration//GEN-END:variables
    
}
